buildImportTrees basetree msubdir addunlockedmatcher (ImportedFull imported) =
buildImportTreesGeneric (convertImportTree addunlockedmatcher) basetree msubdir imported
buildImportTrees basetree msubdir addunlockedmatcher (ImportedDiff (LastImportedTree oldtree) imported) = do
- liftIO $ print $ importableContents imported
importtree <- if null (importableContents imported)
then pure oldtree
else applydiff
(importableContents imported)
newtreeitems <- catMaybes <$> mapM mktreeitem new
let removedfiles = map (mkloc . fst) removed
- liftIO $ print ("removed", removedfiles)
inRepo $ adjustTree
(pure . Just)
-- ^ keep files that are not added/removed the same
data Diffed t
= DiffChanged t
| DiffRemoved
- deriving (Eq, Show)
+ deriving (Eq)
data Imported
= ImportedFull (ImportableContentsChunkable Annex (Either Sha Key))
(diff, cleanup) <- inRepo $ Git.DiffTree.diffTreeRecursive
prevcidtree
currcidtree
- liftIO $ print (diff, prevcidtree, currcidtree)
let (removed, changed) = partition isremoval diff
- liftIO $ print (removed, changed)
let mkicchanged ti = do
v <- M.lookup (Git.DiffTree.dstsha ti) cidtreemap
return (mkloc ti, v)